package cn.com.b2office.dao;

import java.util.List;

import cn.com.b2office.domain.Order;
import cn.com.b2office.domain.OrderItem;

public interface OrderDao {

	String createOrderId();

	String createOrderItemId();

	List<String> createOrderItemId(int num);

	void createOrder(Order order);

	List<Order> findOrders(String memberId, int firstResult, int maxResults);
	
	List<Order> findOrders(String memberId, int orderStatus, int firstResult,int maxResults);

	List<OrderItem> findOrderItems(String orderId);

	void createOrderItem(OrderItem orderItem);

	void createOrderItems(List<OrderItem> orderItems);
	
	Order getFirstValidOrder(String memberId);
	
	Order getOrder(String orderId);
	
	void updateOrder(Order order);
	
	/** 根据订单状态查询订单 */
	int getTotalRecordNumByOrderStatus(String memberId, int orderStatus);
	
}
